#include <iostream>
#include <cstring>

using namespace std;

char s[15];

int main(){
    scanf("%s", &s);
    char m[12] = "0123456789X";
    int tmp = 1;
    int sum = 0;
    for(int i = 0; i < 12; i++){
        if(s[i] == '-') continue;
        sum += (s[i] - '0') * tmp++;
    }
    if(m[sum % 11] == s[12])    cout << "Right";
    else{
        s[12] = m[sum % 11];
        printf("%s", s);
    }
    return 0;
}